<style scoped lang="scss"></style>
<template>
  <div class="user-search">
    <SearchHeader :defaultTab="'user'" :placeholder="'1'" @back="handleBack" @tab-change="handleSwitchTab"
      @search="handleSearch" />
  </div>
</template>
<script setup>
import SearchHeader from '@/components/common/SearchHeader.vue'
import { useRouter } from 'vue-router'
const router = useRouter()
const handleBack = () => {
  router.push('/home')
}
const handleSwitchTab = (tab) => {
  if (tab === 'video') {
    router.push('/search/video')
  } else if (tab === 'user') {
    router.push('/search/user')
  }
}
const handleSearch = (params) => {
  console.log(params);
}
</script>